<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>emplist</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link rel="stylesheet" type="text/css" href="css/style.css" />
	</head>
	<body>
		<div id="wrap">
			<div id="top_content"> 
				<div id="header">
						<div id="rightheader">
							<p>
                                当前用户：  ${role}<a href="login.jsp">退出</a><br/>
							</p>
						</div>
						<div id="topheader">
							<h1 id="title">
								<a href="#">通讯录</a>
							</h1>
						</div>
					<div id="navigation">
					</div>
				</div>
				<div id="content">
					<p id="whereami">
					</p>
					<h1>
						Welcome!
					</h1>
					<table class="table">
						<tr class="table_header">
							<td>
								ID
							</td>
							<td>
								Username
							</td>
							<td>
								Role
							</td>
							<td>
								Description
							</td>
							<td>
								Operation
							</td>
						</tr>
						<!-- 遍历 -->
						<c:forEach items="${shows}" var="show" varStatus="status">
							<tr class="table_body">
							<td>
								${show.manageid} 
							</td>
							<td>
								${show.username} 
							</td>
							<td>
								${show.role} 
							</td>
							<td>
								${show.description} 
							</td>
							<td>
								<c:if test='${show.role == "普通用户"}'>
									<a href="super/upper.do?manageid=${show.manageid}">升为普通管理员</a>
								</c:if>
								<c:if test='${show.role == "普通管理员"}'>
									<a href="super/lower.do?manageid=${show.manageid}">降为普通用户</a>
								</c:if>
							</td>
						</tr>
						</c:forEach>
						
					</table>
				</div>
			</div>
			<div id="footer">
				<div id="footer_bg">
				ABC@126.com
				</div>
			</div>
		</div>
	</body>
</html>
